package com.example.j2025_11_11;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

@Component
public class StudentCommpent {
    @Bean("S1")
    @Primary
    public Stduent s1(){
        return new Stduent("zhangsan",13);
    }
    @Bean
    public Stduent s2(){
        return new Stduent("lisi",12);
    }
}
